package com.dkts.oil.router.thread;

import com.dkts.oil.router.impl.LycToZyStrategy;
import com.dkts.oil.router.param.RouterInfo;
import com.dkts.oil.web.vo.request.RouteCommonRequest;

import java.util.concurrent.CountDownLatch;
import java.util.function.Consumer;

public class LycToZyRouteTask extends RouteLycToZyTask {

    private final LycToZyStrategy cbkTOXhkStrategy;

    private final Integer type;
    private final Double locateRouteDistance;
    private final Double createNewRoadDistance;

    public LycToZyRouteTask(RouteCommonRequest param, String url,
                            Consumer<RouterInfo> callback, CountDownLatch latch,
                            LycToZyStrategy cbkTOXhkStrategy, String profile,Integer  type, Double locateRouteDistance, Double createNewRoadDistance) {
        super(param, url, callback, latch, profile);
        this.cbkTOXhkStrategy = cbkTOXhkStrategy;
        this.type = type;
        this.locateRouteDistance = locateRouteDistance;
        this.createNewRoadDistance = createNewRoadDistance;
    }

    @Override
    protected RouterInfo getRouterAll() {
        return cbkTOXhkStrategy.getRouterAll(param, url, profile, type, createNewRoadDistance,locateRouteDistance);
    }
}
